
#pragma once


#include <string>
#include <cstdint>
extern "C" {

    #include <libavcodec/avcodec.h>
    #include <libavformat/avformat.h>
    #include <libavutil/frame.h>
    #include <libavcodec/packet.h>
}

int32_t open_input_output_file(const std::string & input_file, const std::string & output_file);

void close_input_output();

int32_t read_yuv_to_frame(AVFrame * frame);

void write_pkt_to_file(AVPacket * pkt);

int32_t end_of_input_file();

int32_t read_data_to_buf(uint8_t * buf, int32_t size, int32_t & out_size);

int32_t write_frame_to_yuv(AVFrame * frame);


